<template>
	<view>
		<view> 分包 B 的Index页面</view>
		<subassemblies class="subassembliesCss" :userItem="userItem" @hello="hello" />
		<view @click="toSubPackagesA(title)">subPackagesA</view>
	</view>
</template>

<script>
	import subassemblies from '@/subPackagesA/subassemblies/subassemblies.vue'
	export default {
		components: {
			subassemblies
		},
		data() {
			return {
				title: 'Hello',
				userItem: ['张三', '李四', '王五', '老六']
			};
		},
		onLoad(option) {
			const item = JSON.parse(decodeURIComponent(option.obj));
			console.log(item);
		},
		methods: {
			hello(user, index) {
				console.log(`索引${index} - ${user}，你好！`);
			},
			toSubPackagesA(title) {
				let obj = {
					title
				}
				uni.navigateTo({
					url: `/subPackagesA/index/index?obj=${encodeURIComponent(JSON.stringify(obj))}`
				})
			}
		}
	}
</script>

<style>
</style>